Skip to content

Fix: TypeScript root detection to support Python project markers - #39

Merged
dejo1307 merged 1 commit into
mainfrom
fix--ts_extractor-detection-for-python
Jun 20, 2026
Merged

Fix: TypeScript root detection to support Python project markers#39
dejo1307 merged 1 commit into
mainfrom
fix--ts_extractor-detection-for-python

Conversation

@GertL

@GertL GertL commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix TypeScript extractor's detection of deep/nested projects by extending the heuristics to recognize Python project markers (pyproject.toml, setup.py, setup.cfg, requirements.txt). This ensures the TS root search uses a deeper recursion depth for repos that are multi-language or deeply nested Python projects.

Changes

  • File: internal/extractors/tsextractor/ts.go
    • Renamed isJavaStructured()isDeepNestedProject()
    • Extended marker detection to include Python project files:
      • Java markers: pom.xml, build.gradle, build.gradle.kts
      • New Python markers: pyproject.toml, setup.py, setup.cfg, requirements.txt
    • When isDeepNestedProject() returns true, maxDepth is increased from 2 to 8

Why

Previously the extractor only treated Java projects as "deeply nested" and increased search depth accordingly. That missed Python monorepos or repositories with deeply nested TS/JS code under Python projects, causing the TS extractor to stop searching too early and fail to locate the TypeScript root.
Adding common Python markers makes the extractor more robust in multi-language repositories and monorepos.

@GertL
GertL requested a review from dejo1307 June 20, 2026 05:10
@dejo1307
dejo1307 merged commit 113f257 into main Jun 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants